import {useLocation} from "react-router-dom";

const News = () => {
    const {id, title, content} = useLocation().state;
    return (
        <div>
            <h1>我是News组件</h1>
            <h2>{id}</h2>
            <h2>{title}</h2>
            <h2>{content}</h2>
        </div>
    )
}

export default News
